/**
 * 防爬虫
 */
const _bot = [
    'Googlebot',
    'apizza-extension',
    'postman',
    'postwoman'
]
module.exports = (req, res, next) => {
    const userAgent = req.get("User-Agent");

    if (userAgent) {
        if (_bot.includes(userAgent)) {
            res.status(403).end();
            return;
        }
    }
    next();
}
